1. Field of the Invention
The present invention relates generally to data transfers over an I/O bus, and more particularly, to Packetized SCSI Protocol Data transfers.
2. Description of Related Art
Prior to the Packetized SCSI Protocol, the SCSI Protocol utilized the well-known SCSI bus phases, Message Out, Message In, Command, Data Out, Data In, and Status to exchange information and data between a SCSI initiator and a SCSI target over a SCSI bus. Performance improvements throughout the revisions of the SCSI Protocol have been primarily in the data phases. Consequently, information can be transferred between the SCSI initiator and the SCSI target at a very much higher rate in the data phases than in any of the other SCSI phases.
To capitalize on the higher data throughput during the SCSI data phases, the Packetized SCSI Protocol specifies that all information exchanged between a SCSI initiator and a SCSI target is done via packets, called information units (IU), in either the Data In or the Data Out phases exclusively. Originally, each data packet, referred to herein as a data packet information unit, was immediately preceded by a header packet, referred to herein as a header packet information unit. The header packet information unit contained information about the immediately following data packet information unit, such as the length of the data packet information unit.
According to the Packetized SCSI Protocol, data transfers from a SCSI initiator, sometimes referred to as initiator, to a SCSI target, sometimes referred to as target, were initiated by the target transferring a header packet information unit to the initiator via the Data In phase. The header packet information unit was basically a request by the target for the initiator to fetch data from the host for transfer to the target. After sending the header packet information unit, the target switched the SCSI bus phase to Data Out and awaited the data.
Data transfers from the target to the initiator were also initiated by the target transferring a header packet information unit to the initiator via the Data In phase. This header packet information unit basically was a request by the target for the initiator to prepare the initiator""s data path for transfer of data from the target to the host system. After sending the header packet information unit, the target remained in the SCSI bus phase Data In and immediately after sending the header packet information unit could start transferring data to the initiator.
The target sometimes broke a data transfer up into multiple data packet information units, for example, to facilitate target buffer management. For example, at the beginning of a 16 Kbytes data transfer from the initiator to the target, the target may have had only 4 Kbytes of buffer space available to receive data. In this case, the target first transferred a header packet information unit in the Data In phase that specified a data packet information unit length of 4 Kbytes, and then changed the SCSI bus phase to Data Out to receive the 4 Kbytes of data from the initiator.
During the transfer of the data packet information unit, the target may have realized that another 4 Kbytes of buffer space had become available to receive data. At the end of the first 4 Kbytes data packet information unit, the target changed the SCSI bus phase back to Data In, and sent the initiator another header information packet unit requesting another 4 Kbytes of data, and then changed the SCSI bus phase back to Data Out to receive more data.
Similarly, a target could break data transfers from the target to the initiator up into multiple data packet information units with each data packet information unit preceded by a header packet information unit. In this case, the target kept the SCSI bus phase in Data In throughout the transfers.
The transfer of each header packet information unit is purely administrative overhead, and so consumes SCSI bus bandwidth. Likewise, switches between the Data In and Data Out SCSI bus phases are very costly in time. Since performance could be significantly improved by reducing the number of header packet information units and the number of SCSI bus phase changes, the Packetized SCSI Protocol incorporated data streaming.
Data streaming in the Packetized SCSI Protocol is representing multiple data packet information units using a single header packet information unit. Unfortunately, this data streaming is applicable only for data transfers from the initiator to the target. As described above, without streaming, the initiator always expected the target to change the SCSI bus phase to Data In after receiving a data packet information unit in the Data Out phase.
With data streaming, a target signals a data streaming request by remaining in the Data Out phase after receiving a data packet information unit. This signal tells the initiator to reuse the header packet information unit previously received from the initiator to transfer another data packet information unit to the target. This data-streaming scheme eliminated transfer of header packet information units between data packet information units in some situations, and also eliminated the associated SCSI bus phase changes from Data Out to Data In and back to Data Out for transfers from the initiator to the target.
According to the Packetized SCSI Protocol, there is no data streaming for data transfers from the target to the initiator. While several schemes have been proposed for streaming in this direction, all had poor performance and so were not adopted.
While the Packetized SCSI Protocol data streaming does reduce overhead for transfers in one direction, the data streaming does not provide the initiator any information that helps in prefetching data from the host. To maximize performance, the initiator must always have data in its data path. If the initiator waited for a request for data from a target before requesting data from the host, a very large delay would be incurred on the SCSI bus. To eliminate this delay, the initiator assumed data streaming to the target.
Although the initiator anticipated the end of a data packet information unit based upon the length, the initiator prefetched additional data from the host to be ready in the event that the target signaled a request for another data packet information unit. If the target failed to signal such a request, the prefetched data was wasted, and would have to be fetched again. Consequently, the host bus utilization was affected by the wasted prefetching and refetching. Thus, while data streaming did eliminate some SCSI bus overhead, it did not address optimizing system performance including host bus utilization.
According to the principles of this invention, the Packetized SCSI Protocol is extended to facilitate bi-directional data streaming, e.g., streaming from an initiator to a target, and streaming from a target to an initiator, while facilitating improved host input/output (I/O) bus and initiator utilization. In one embodiment of the invention, a method for a SCSI target to support data streaming during the Data In Phase of the Packetized SCSI Protocol transmits a data packet information unit in the Packetized SCSI Protocol Data In phase. The SCSI target also generates a signal during the Packetized SCSI Protocol Data In phase to indicate whether a header packet information unit or another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data In phase. Generating the signal comprises either holding the signal in a first state or asserting a signal so that the signal goes to a second state different from the first state.
In one embodiment, the SCSI target device generates the signal by driving a signal for a parity signal line of a SCSI bus. In this embodiment, the SCSI target device asserts the signal to indicate the header packet information unit is to be transmitted next in the Packetized SCSI Protocol Data In phase.
Hence, with this method, the SCSI target device transmits a header packet information unit in the Packetized SCSI Protocol Data In phase, and then transmits a plurality of data packet information units, one immediately after another in the Packetized SCSI Protocol Data In phase. The SCSI target device asserts a signal for a SCSI bus line during the Packetized SCSI Protocol Data In phase to indicate transmission of another header packet information unit in the Packetized SCSI Protocol Data In phase. Hence, the SCSI target device supports data streaming in the Data In phase of the Packetized SCSI Protocol.
Hence, in this embodiment of the invention, a SCSI target device includes a target read streaming module configured to perform a method comprising:
transmitting a data packet information unit in a Packetized SCSI Protocol Data In phase; and
generating a signal during the Packetized SCSI Protocol Data In phase to indicate whether a header packet information unit or another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data In phase.
In another embodiment, the SCSI target device includes a target read streaming module configured to perform a method comprising:
entering a Packetized SCSI Protocol Data In phase;
transmitting a header packet information unit in the Packetized SCSI Protocol Data In phase;
transmitting a data packet information unit in the Packetized SCSI Protocol Data In phase;
determining whether to transmit another header packet information unit in the Packetized SCSI Protocol Data In phase; and
asserting a signal for a SCSI bus line, during the Packetized SCSI Protocol Data In phase, to indicate transmission of another header packet information unit in the Packetized SCSI Protocol Data In phase upon determining to transmit another header packet information unit.
Still another feature of this invention is a method and structure for supporting data streaming by a SCSI initiator during the Data In phase of the Packetized SCSI Protocol. In one embodiment of this method, the SCSI initiator receives a data packet information unit in the Packetized SCSI Protocol Data In phase. The SCSI initiator also receives a signal in the Packetized SCSI Protocol Data In phase to indicate whether a header packet information unit or another data packet information unit is to be received next in the Packetized SCSI Protocol Data In phase.
In one embodiment, the SCSI initiator receives the signal from a parity signal line of a SCSI bus. The SCSI initiator interprets an asserted signal to indicate the header packet information unit is to be received next in the Packetized SCSI Protocol Data In phase in this embodiment.
Hence, with this method, the SCSI initiator receives a header packet information unit in the Packetized SCSI Protocol Data In phase, and then receives a plurality of data packet information units, one immediately after another. The SCSI initiator determines whether a signal on a SCSI bus line has been asserted during the Packetized SCSI Protocol Data In phase to indicate transmission of another header packet information unit in the Packetized SCSI Protocol Data In phase following transmission of the plurality of data packet information units. The SCSI initiator receives the another header packet information unit in the Packetized SCSI Protocol Data In phase upon determining the signal has been asserted. Thus, the SCSI initiator supports data streaming in the Packetized SCSI Protocol Data In
Hence, in this feature of the invention, a SCSI initiator device includes an initiator read streaming module configured to perform a method comprising:
receiving a data packet information unit in a Packetized SCSI Protocol Data In phase;
receiving a signal by the SCSI initiator in the Packetized SCSI Protocol Data In phase to indicate whether a header packet information unit or another data packet information unit is to be received next in the Packetized SCSI Protocol Data In phase; and
interpreting an asserted signal to indicate the header packet information unit is to be received next in the Packetized SCSI Protocol Data In phase.
Still another feature of this invention includes a method and system for data streaming during the Data In Phase of the Packetized SCSI Protocol. According to one embodiment of this method a data packet information unit is transferred in a Packetized SCSI Protocol Data In phase between a SCSI target and a SCSI initiator over a SCSI bus. Also, a signal is generated on the SCSI bus by the SCSI target in the Packetized SCSI Protocol Data In phase to indicate whether a header packet information unit or another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data In phase to the SCSI initiator.
Hence, with this system, a header packet information unit is transferred from the SCSI target to the SCSI initiator in the Packetized SCSI Protocol Data In phase and then a plurality of data packet information units are transferred, one immediately after another, from the SCSI target to the SCSI initiator in the Packetized SCSI Protocol Data In phase. A signal is generated on a SCSI bus line by the SCSI target during the Packetized SCSI Protocol Data In phase to indicate transmission of another header packet information unit in the Packetized SCSI Protocol Data IN phase to the SCSI initiator. Hence, this system performs data streaming.
With this feature of the invention, a SCSI system includes a SCSI bus; a SCSI target connected to the SCSI bus, where the SCSI target includes a target read streaming module configured to perform a method comprising:
transmitting a data packet information unit over the SCSI bus in a Packetized SCSI Protocol Data In phase; and
generating a streaming signal on the SCSI bus during the Packetized SCSI Protocol Data In phase to indicate whether a header packet information unit or another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data In phase; and
a SCSI initiator connected to the SCSI bus, where the SCSI initiator includes an initiator read streaming module configured to perform a method comprising:
receiving the data packet information unit from the SCSI bus in a Packetized SCSI Protocol Data In phase by the SCSI initiator;
receiving the streaming signal on the SCSI bus in the Packetized SCSI Protocol Data In phase indicating whether a header packet information unit or another data packet information unit is to be received next in the Packetized SCSI Protocol Data In phase; and
interpreting an asserted signal to indicate the header packet information unit is to be received next in the Packetized SCSI Protocol Data In phase.
The above features of the invention facilitated data streaming in the Data In phase of the Packetized SCSI Protocol. Other features of this invention, enhance utilization of a SCSI initiator in the Data Out Phase of the Packetized SCSI protocol. One of these features is a method and structure for supporting flow control by a SCSI target during the Data Out phase of the Packetized SCSI Protocol.
In one embodiment, a SCSI target receives a data packet information unit in a Packetized SCSI Protocol Data Out phase. The SCSI target generates a signal during the Packetized SCSI Protocol Data Out phase to indicate whether another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data Out phase. Generating the signal comprises either holding the signal in a first state or asserting a signal so that the signal goes to a second state different from the first state.
In one embodiment, generating the signal includes driving a signal for a parity signal line of a SCSI bus. For example, the SCSI target asserts a signal to indicate that the another data packet information unit is not to be transmitted in the Packetized SCSI Protocol Data Out phase. Hence, with this method, the SCSI target enters a Packetized SCSI Protocol Data Out and supplies a signal on a parity bit line of a SCSI bus line during the SCSI Protocol Data Out phase to indicate whether another data packet information unit is to be transmitted next.
With this embodiment, a SCSI target device includes a flow control module configured to perform a method comprising:
receiving a data packet information unit in a Packetized SCSI Protocol Data Out phase; and
generating a signal during the Packetized SCSI Protocol Data Out phase to indicate whether another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data Out phase.
Another feature of this portion of the invention is a method and structure for supporting flow control by a SCSI initiator during the Data Out phase of the Packetized SCSI protocol. In this embodiment, a SCSI initiator transmits a data packet information unit in a Packetized SCSI Protocol Data Out phase by the SCSI initiator. The SCSI initiator also receives a signal in the Packetized SCSI Protocol Data Out phase indicating whether another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data Out phase.
Hence, with this method, the SCSI initiator transmits a plurality of data packet information units, one immediately after another, in the Packetized SCSI Protocol Data Out phase. The SCSI initiator also monitors a signal level on a parity line of a SCSI bus to determine whether the transmitting a plurality of data packet information units is to be terminated.
In this embodiment, a SCSI initiator device includes a flow control module configured to perform a method comprising:
transmitting a data packet information unit in a Packetized SCSI Protocol Data Out phase;
monitoring a signal on a parity bit line of a SCSI bus in the Packetized SCSI Protocol Data Out phase to determine whether another data packet information unit is to be transmitted in the Packetized SCSI Protocol Data Out phase; and
interpreting an asserted signal to indicate the another data packet information unit is not to be transmitted in the Packetized SCSI Protocol Data Out phase.
Still another feature of this portion of the invention is a method and system for flow control during the Data Out phase of the Packetized SCSI Protocol. In this method a data packet information unit is transferred in a Packetized SCSI Protocol Data Out phase between a SCSI initiator and a SCSI target over a SCSI bus. Also, the SCSI target generates a signal on the SCSI bus by the SCSI target in the Packetized SCSI Protocol Data Out phase to indicate whether another data packet information unit is to be accepted in the Packetized SCSI Protocol Data Out phase by the SCSI Target. In one embodiment, the SCSI target generates the signal on a parity signal line of the SCSI bus.
Thus, in this embodiment, a SCSI system includes a SCSI bus; a SCSI target connected to the SCSI bus, the SCSI target comprising a target flow control module configured to perform a method comprising:
receiving a data packet information unit over the SCSI bus in a Packetized SCSI Protocol Data Out phase; and
generating a flow control signal on the SCSI bus during the Packetized SCSI Protocol Data Out phase to indicate whether another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data Out phase; and
a SCSI initiator connected to the SCSI bus, the SCSI initiator comprising an initiator flow control module configured to perform a method comprising:
transmitting the data packet information unit from the SCSI bus in a Packetized SCSI Protocol Data Out phase;
receiving the flow control signal on the SCSI bus in the Packetized SCSI Protocol Data Out phase indicating whether another data packet information unit is to be transmitted next in the Packetized SCSI Protocol Data Out phase by the SCSI initiator; and
interpreting an asserted signal to indicate that another data packet information unit is not to be transmitted in the Packetized SCSI Protocol Data Out phase.